import React from 'react'
import { Navigate } from 'react-router-dom'

export default function AuthComponent(props) {
  console.log(props);
  console.log(props.children)

  return (
    localStorage.getItem('userName')?props.children:<Navigate to={'/login'}></Navigate>
  )
}
